<div class="member">
<form method="post" enctype="multipart/form-data">
    <div class="title-dangky"><?php echo lang('dangkythanhviendesign');?></div>
    <?php echo $this->Session->flash();?>
        <div class="row-fluid">
            <div class="box-input-theath">
                <div class="row-fluid">
                    <div class="span3 offset1"><?php echo lang('tenhienthi');?></div>
                    <div class="span8"><input class="span9" placeholder="<?php echo lang('tenhienthi');?>" name="data[User][fullname]" type="text" value="" maxlength="80" /></div>
                </div>
            </div><!--end box-input-theath-->
            <div class="box-input-theath">
                <div class="row-fluid">
                    <div class="span3 offset1"><?php echo lang('ngaysinh');?></div>
                    <div class="span8">
                        <select name="data[User][birth_date]" class="span3">
                        <option value="0"><?php echo lang('ngay');?></option>
                        <?php for($i=1;$i<=31;$i++){
                            ?><option><?php echo $i;?></option><?php
                        } ?>
                      </select>
                      <select name="data[User][birth_month]" class="span3">
                        <option value="0"><?php echo lang('thang');?></option>
                        <?php for($i=1;$i<=12;$i++){
                            ?><option><?php echo $i;?></option><?php
                        } ?>
                      </select>
                      <select name="data[User][birth_year]" class="span3">
                        <option value="0"><?php echo lang('nam');?></option>
                        <?php for($i=2010;$i>=1900;$i--){
                            ?><option><?php echo $i;?></option><?php
                        } ?>
                      </select>
                    </div>
                </div>
            </div><!--end box-input-theath-->   
            <div class="box-input-theath">
                <div class="row-fluid">
                    <div class="span3 offset1"><?php echo lang('nghanhthietke');?></div>
                    <div class="span8">
                        <select name="data[User][nghanhnghe]" class="span9">
                            <option value=""><?php echo lang('nghanhthietke');?></option>
                            <?php 
                                foreach($nghanhthietke as $key=>$value){
                            ?>
                                <option value="<?php echo $key;?>"><?php echo $value;?></option>
                            <?php }?>
                        </select>
                    </div>
                </div>
            </div><!--end box-input-theath-->
            <div class="box-input-theath">
                <div class="row-fluid">
                    <div class="span3 offset1"><?php echo lang('homthu');?></div>
                    <div class="span8"><input class="span9" placeholder="<?php echo lang('homthu');?>" name="data[User][email]" type="email" id="email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$"/><div class="emaildisplay"></div></div>
                </div>
            </div><!--end box-input-theath-->
            <div class="box-input-theath">
                <div class="row-fluid">
                    <div class="span3 offset1"><?php echo lang('matkhau');?></div>
                    <div class="span8"><input class="span9" placeholder="<?php echo lang('matkhau');?>" name="data[User][password]" type="password" /></div>
                </div>
            </div><!--end box-input-theath-->
            <div class="box-input-theath">
                <div class="row-fluid">
                    <div class="span3 offset1"><?php echo lang('rematkhau');?></div>
                    <div class="span8"><input class="span9" placeholder="<?php echo lang('rematkhau');?>" name="data[User][repassword]" type="password" /></div>
                </div>
            </div><!--end box-input-theath-->
            <div class="box-input-theath">
                <div class="row-fluid">
                    <div class="span3 offset1"><?php echo lang('maxacnhan');?></div>
                    <div class="span8">
                        <input type="text" name="captcha" placeholder="Nhập mã trong hình" id="captcha-form" required="" class="span3" /> <span class="catchadisplay"></span>
                        <img src="<?php echo DOMAIN;?>captcha" id="captcha" style="width: 19%;"/>
                        <span onclick="document.getElementById('captcha').src='<?php echo DOMAIN;?>captcha?'+Math.random();document.getElementById('captcha-form').focus();return false;"> <strong><?php echo lang('doima');?></strong></span>
                    </div>
                </div>
            </div><!--end box-input-theath-->
            <div class="box-input-theath">
                <div class="row-fluid">
                    <div class="span3 offset1"></div>
                    <div class="span8">
                        <input type="submit" value="<?php echo lang('dangky');?>" class="btn btn-primary" />
                        <input type="button" class="btn" onclick="javascript:history.go(-1);" value="<?php echo lang('boqua');?>" />
                    </div>
                </div>
            </div><!--end box-input-theath-->
        </div>
    </form>
</div>

<script language="javascript">
    $('input#username').change(function() {
        var v = $(this).val();
        $.ajax({
            url:'<?php echo DOMAIN;?>user/username_check',
            type: 'POST',
            cache: false,
            data:'id='+ v,
            dataType: 'html',
            success:function(data){
                 $('.userdisplay').html(data);
            }
        });
    });

    $('input#email').change(function() {
        var v = $(this).val();
        $.ajax({
            url:'<?php echo DOMAIN;?>user/email_check',
            type: 'POST',
            cache: false,
            data:'id='+ v,
            dataType: 'html',
            success:function(data){
                 $('.emaildisplay').html(data);
            }
        });
    });

    $('input#captcha-form').change(function() {
        var v = $(this).val();
        $.ajax({
            url:'<?php echo DOMAIN;?>user/catcha_check',
            type: 'POST',
            cache: false,
            data:'id='+ v,
            dataType: 'html',
            success:function(data){
                 $('.catchadisplay').html(data);
            }
        });
    });
</script>
</div>